class Price:
    price=100
    holidayprice=100*1.2
    childprice=50

    def calcprice(self,man,child=0,holiday=False):
        if holiday:
            sum=(int(man)*100+int(child)*50)*1.2
            print('今天是节假日，%s个大人，%s个小孩的票价为：%f'%(man,child,sum))
        else:
            sum = int(man) * 100 + int(child) * 50
            print('今天是节假日，%s个大人，%s个小孩的票价为：%f' % (man, child, sum))

a=Price()
a.calcprice(2,1,True)